// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.linqingying.gitcode.pullrequest.data.service

import com.intellij.openapi.progress.ProgressIndicator
import org.jetbrains.annotations.CalledInAny
import com.linqingying.gitcode.api.data.GCComment
import com.linqingying.gitcode.api.data.GitCodeIssueCommentWithHtml
import com.linqingying.gitcode.pullrequest.data.GCPRIdentifier
import java.util.concurrent.CompletableFuture

interface GCPRCommentService {

  @CalledInAny
  fun addComment(progressIndicator: ProgressIndicator, pullRequestId: GCPRIdentifier, body: String)
    : CompletableFuture<GitCodeIssueCommentWithHtml>

  @CalledInAny
  fun updateComment(progressIndicator: ProgressIndicator, commentId: String, text: String): CompletableFuture<GCComment>

  @CalledInAny
  fun deleteComment(progressIndicator: ProgressIndicator, commentId: String): CompletableFuture<out Any?>
}
